HAL TIM macro migration

This section provides information about the HAL TIM macro migration.

HAL TIM enable interrupt

HAL1

HAL2

__HAL_TIM_ENABLE_IT()

Removed ; use LL_TIM_EnableIT instead


HAL TIM disable interrupt

HAL1

HAL2

__HAL_TIM_DISABLE_IT()

Removed : use LL_TIM_disableIT instead


HAL TIM enable main output

HAL1

HAL2

__HAL_TIM_ENABLE_IT()

Removed : use LL_TIM_EnableAllOutputs instead


HAL TIM disable main output

HAL1

HAL2

__HAL_TIM_DISABLE_IT()

Removed : use LL_TIM_DisableAllOutputs instead


HAL TIM clear flag

HAL1

HAL2

__HAL_TIM_CLEAR_FLAG()

Removed : replaced by a specific LL function for each interrupt source flag already exist in HAL1.

for example:

  • LL_TIM_ClearFlag_UPDATE
    
  • LL_TIM_ClearFlag_CC1
    
  • LL_TIM_ClearFlag_BRK...
    

HAL TIM clear interrupt flag

HAL1

HAL2

__HAL_TIM_CLEAR_IT()

Removed : replaced by a specific LL function for each interrupt source flag already exist in HAL1.

for example:

  • LL_TIM_ClearFlag_UPDATE
    
  • LL_TIM_ClearFlag_CC1
    
  • LL_TIM_ClearFlag_BRK...
    

HAL TIM get flag

HAL1

HAL2

__HAL_TIM_GET_FLAG()

Removed : replaced by a specific LL function for each interrupt source flag already exist in HAL1.

for example:

  • LL_TIM_IsActiveFlag_UPDATE
    
  • LL_TIM_IsActiveFlag_CC1
    
  • LL_TIM_IsActiveFlag_BRK...
    

HAL TIM get interrupt source

HAL1

HAL2

__HAL_TIM_GET_IT_SOURCE()

Removed : replaced by a specific LL function for each interrupt source already exist in HAL1.

for example:

  • LL_TIM_IsEnabledIT_UPDATE
    
  • LL_TIM_IsEnabledIT_CC1
    
  • LL_TIM_IsEnabledIT_BRK...
    

HAL TIM update event source

HAL1

HAL2

__HAL_TIM_URS_ENABLE() / __HAL_TIM_URS_DISABLE()

Removed : and replaced by a single function LL_TIM_SetUpdateSource to set the appropriate update event source.

Related concept: Removal of hardware-related macros in HAL2


HAL TIM reset handle state

HAL1

HAL2

__HAL_TIM_RESET_HANDLE_STATE()

Removed ; use HAL_TIM_DeInit() instead when you need to reset all states.

Related concept: Removal of hardware-related macros in HAL2